package com.sfteam.bmw.utils;

import com.jfinal.kit.HttpKit;
import com.jfinal.kit.PropKit;

public final class WeiXinReqUtil {

	/**
	 * 获取用户的session_key和openid
	 * 
	 * @param code
	 * @return
	 */
	public static String jscode2session(String code) {
		
		String reqUrl = String.format(Constants.SESSION_KEY, PropKit.get("appid"),
				PropKit.get("secret"), code);
		return HttpKit.get(reqUrl);
	}
}
